<template>
  <div ref="myDiv" class="radar-echart" />

</template>

<script>
var echarts=require('echarts')  //全部导入
// require('echarts/lib/chart/radar') // 引入雷达图
// // 引入提示框和标题组件
// require('echarts/lib/component/tooltip')
// require('echarts/lib/component/title')
export default {
  name: "echart",

  mounted() {
    const myChart = echarts.init(this.$refs.myDiv) // 得到图表实例
    myChart.setOption({
      legend: {
        top: 'bottom'
      },

      series: [
        {
          name: '面积模式',
          type: 'pie',
          radius: [25, 150],
          center: ['50%', '50%'],
          roseType: 'area',
          itemStyle: {
            borderRadius: 8
          },
          data: [
            {value: 40, name: '信息工程学院'},
            {value: 38, name: '外国语学院'},
            {value: 32, name: '机电学院'},
            {value: 30, name: '化学学院'},

          ]
        }
      ]
    })
  }
}
</script>

<style >
.radar-echart {
  width: 500px;
  height: 500px;
}
</style>
